package com.dubbo.microserviceweb.error;

public enum EmBussinessError implements CommonError {
    //通用错误类型10001
    PARAMETER_VALIDATION_ERROR(10001,"参数不合法"),
    UNKNOW_ERROR(10002,"未知错误"),

    //以20000开头的为用户信息相关错误定义
    USER_NOT_EXIST(20001,"用户不存在"),

    //以30000开头的为论文信息相关错误定义
    PAPER_NOT_EXIST(30001,"没有该论文，请联系管理员添加"),
    ;


    private int errCode;
    private String errMsg;

    private EmBussinessError(int errCode,String errMsg){
        this.errMsg = errMsg;
        this.errCode = errCode;
    }

    @Override
    public int getErrCode() {
        return this.errCode;
    }

    @Override
    public String getErrMsg() {
        return this.errMsg;
    }

    @Override
    public CommonError SetErrMsg(String errMsg) {
        this.errMsg = errMsg;
        return this;
    }
}
